#pragma once

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <memory>
#include <thread>
#include <opencv2/opencv.hpp>
#include <fstream>
#include <condition_variable>
#include <regex>
#include "../common/NSJson.h"
#include <list>
#include "Detection.h"

class VideoQualityDetection
{
public:

	VideoQualityDetection();

	void detector(const Json::Value& jmessage);

	const Json::Value detectorinfo(const Json::Value& jmessage);

	int detectStart(cv::Mat src);	

	void orderDetect(cv::Mat src);

	const Json::Value videoCaptureFun(std::string strVideo);

	static VideoQualityDetection& getInstance() {
		static VideoQualityDetection instance;
		return instance;
	};
private:
	//VideoQualityDetection() = default;

	

	~VideoQualityDetection() {};
	VideoQualityDetection(const VideoQualityDetection&) = delete;
	VideoQualityDetection& operator=(const VideoQualityDetection&) = delete;

public:
	std::list<std::unique_ptr<Detection>> m_queue;
	int m_nTaskid;

	Json::Value m_jmessage;
};

